
<?php	
	$petitions = (string)$this->config->item('petitions');
	$menu_array=array('Popular'=>  $petitions . "/popular", 'Trending'=>  $petitions. "/trending",'Create a Petition'=>'create/petition'); 
	get_instance()->session->set_userdata('last_url', current_url());	
	if (get_instance()->session->userdata('current_user')) {
		$menu_array['Log out'] = 'logout';
		
}
else $menu_array['Log In'] = 'login';
?>
<div id='top-menu-container' class="row navbar">
<ul id='top-menu' class="twelve columns">
	<?php 
		foreach($menu_array as $key=>$value){
			echo ('<li id="top-menu-option" class="three columns">');
			echo anchor($value,$key);
			echo ('</li>');	
		}
	?>
</ul>
</div>